package business

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type EnterpriseRouter struct {
}

// InitEnterpriseRouter 初始化 企业 路由信息
func (s *EnterpriseRouter) InitEnterpriseRouter(Router *gin.RouterGroup) {
	enterpriseRouter := Router.Group("enterprise").Use(middleware.OperationRecord())
	enterpriseRouterWithoutRecord := Router.Group("enterprise")
	var enterpriseApi = v1.ApiGroupApp.BusinessApiGroup.EnterpriseApi
	{
		enterpriseRouter.POST("createEnterprise", enterpriseApi.CreateEnterprise)             // 新建企业
		enterpriseRouter.DELETE("deleteEnterprise", enterpriseApi.DeleteEnterprise)           // 删除企业
		enterpriseRouter.DELETE("deleteEnterpriseByIds", enterpriseApi.DeleteEnterpriseByIds) // 批量删除企业
		enterpriseRouter.PUT("updateEnterprise", enterpriseApi.UpdateEnterprise)              // 更新企业
	}
	{
		enterpriseRouterWithoutRecord.GET("findEnterprise", enterpriseApi.FindEnterprise)       // 根据ID获取企业
		enterpriseRouterWithoutRecord.GET("getEnterpriseList", enterpriseApi.GetEnterpriseList) // 获取企业列表
	}
}
